package com.block.datapush.form.item.util;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

public class JinRiFenQiUtil {

    public static Integer getYuqi(String yuqi){
        if (StrUtil.equals(yuqi, BaseTypeInfoEnum.Yuqi.yq002.getValue())){
            return 1;
        }
        return 3;
    }

    public static Integer getZhima(String zhima){
        if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm005.getValue())){
            return 3;
        }else  if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm004.getValue())){
            return 2;
        }else  if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm003.getValue())) {
            return 1;
        }else  if (StrUtil.equals(zhima, BaseTypeInfoEnum.ZhimaScore.zm002.getValue())) {
            return 5;
        }
        return 5;
    }

    public static Integer getHouse(String house){
        if (StrUtil.equals(house, BaseTypeInfoEnum.House.hu001.getValue())){
            return 4;
        }
        return 1;
    }

    public static Integer getCar(String car){
        if (StrUtil.equals(car, BaseTypeInfoEnum.Car.car001.getValue())){
            return 3;
        }
        return 1;
    }

    public static Integer getHuabei(String huabei){
        if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb004.getValue())){
            return 5;
        } else if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb003.getValue())){
            return 5;
        } else if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb002.getValue())){
            return 4;
        }
        return 4;
    }

    public static Integer getBaitiao(String baitiao){
        if (StrUtil.equals(baitiao, BaseTypeInfoEnum.Baitiao.bt004.getValue())){
            return 5;
        }else if (StrUtil.equals(baitiao, BaseTypeInfoEnum.Baitiao.bt003.getValue())){
            return 5;
        }else if (StrUtil.equals(baitiao, BaseTypeInfoEnum.Baitiao.bt002.getValue())){
            return 4;
        }
        return 4;
    }

    public static Integer getBaoDan(String baodan){
        if (StrUtil.equals(baodan, BaseTypeInfoEnum.Insurance.in001.getValue())){
            return 2;
        }
        return 1;
    }

    public static Integer getGjjSheBao(String gjj, String shebao){
        if (StrUtil.equals(gjj, BaseTypeInfoEnum.Gjj.gjj002.getValue()) &&
                StrUtil.equals(shebao, BaseTypeInfoEnum.SocialInsurance.si002.getValue())){
            return 1;
        }else if (StrUtil.equals(gjj, BaseTypeInfoEnum.Gjj.gjj002.getValue())){
            return 2;
        }else if (StrUtil.equals(shebao, BaseTypeInfoEnum.SocialInsurance.si002.getValue())){
            return 3;
        }
        return 4;
    }
}
